package view.hero
{
import core.model.PlayerModel;

import flash.display.DisplayObject;
import flash.display.MovieClip;

import framework.core.UIWidget;
import framework.proxy.IComponentProxy;
import framework.view.components.Component;

import values.avatar.IAvatarValue;

import view.component.window.WindowComponent;
import view.component.window.WindowProxy;
import view.interfaces.IHeroUI;

/**
 * HeroUI
 * @author jliang
 *
 */
public class HeroUI extends WindowComponent implements IHeroUI
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function HeroUI()
	{
		super();
	}	
    //==========================================================================
    //  Properties
    //==========================================================================
    public function get displayObject():DisplayObject
    {
        return this;
    }
	//==========================================================================
	//  Overridden methods: Component
	//==========================================================================
	override protected function get skinReference():String
	{
		return "swf.ui.HeroUISkin";
	}
	
	override protected function get proxyMapping():Array
	{
		return [ 
			{ skin:"", classRef: HeroUIProxy, id:"window" }
		].concat(super.proxyMapping);
	}
	
	override public function get width():Number
	{
		return 610;
	}
	
	override public function get height():Number
	{
		return 472;
	}
	//==========================================================================
	//  Public methods
	//==========================================================================
	public function showHero(avatar:IAvatarValue = null):void
	{
		HeroUIProxy(window).showHero(avatar);
	}
	
	public function refresh():void
	{
		HeroUIProxy(window).refresh();
	}
}
}



